<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>PointLightHelper</title>
    <link
      rel="shortcut icon"
      type="image/x-icon"
      href="/examples/public/favicon.ico"
    />
    <link rel="stylesheet" href="../css/common.css" />
  </head>

  <style>
    #app {
      width: 100%;
      height: 100%;
    }
  </style>

  <body>
    <div id="app"></div>
    <script type="module">
      import * as THREE from "three";
      import * as Vis from "../../dist/Vis.es.js";

      const dom = document.getElementById("app");

      const engine = new Vis.ModelingEngine()
        .setDom(dom)
        .setSize()
        .setStats(true)
        .play();

      const scene = engine.scene;

      scene.add(
        new THREE.Mesh(
          new THREE.BoxBufferGeometry(10, 10, 10),
          new THREE.MeshStandardMaterial({ color: "rgb(255, 105, 70)" })
        )
      );

      scene.add(new THREE.AmbientLight("white", 1));

      const camera = new THREE.PerspectiveCamera(
        45,
        dom.offsetWidth / dom.offsetHeight,
        5,
        200
      );
      scene.add(camera);

      camera.position.set(-40, 20, 0);
      camera.lookAt(0, 0, 0);

      const cameraHelper = new Vis.CameraHelper(camera);
      scene.add(cameraHelper);

      const orthographic = new THREE.OrthographicCamera(
        -50,
        50,
        50,
        -50,
        5,
        200
      );
      scene.add(orthographic);

      orthographic.position.set(40, 20, 0);
      orthographic.lookAt(0, 0, 0);

      const orthographicHelper = new Vis.CameraHelper(orthographic);
      scene.add(orthographicHelper);
    </script>
  </body>
</html>
